A near field wireless communication technology (NFC), also known as near field wireless communication, is a non-contact identification and interconnection technology, which can implement near field wireless communication between a mobile device, a consumer electronic product, a personal computer (PC), and an intelligent control tool. An electronic device can implement file transmission by using the NFC technology.
When two electronic devices transmit a file by using an NFC function, a transmission rate thereof is low, and a transmission distance ranges from 0 centimeter (cm) to 10 cm. The NFC technology is generally used for a file less than 7 kilobytes (KB). Considering limitations on the rate and the transmission distance, in the prior art, a certain association is established through contact of the electronic devices, and both the electronic devices enable, through a contact protocol, the same transmission function such as wireless network direct transmission (e.g., Wireless Fidelity (Wi-Fi) Direct), wireless network (e.g., Wi-Fi), or Bluetooth (BT) to perform pairing and establish a connection, so that the electronic devices can automatically enable the transmission function, and that a user reduces operation steps.
However, after passing NFC authentication, the electronic devices enable the transmission function through a certain protocol, where the protocol enables the same transmission function, and when either one of the electronic devices does not have the transmission function specified by the protocol, data transmission fails.